package com.excilys.ymca.command.impl;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

import com.excilys.ymca.command.Command;

public class SendMailCommand implements Command {

	private final Context	context;
	private final String	emailAddress;

	public SendMailCommand(Context context, String emailAddress) {
		this.emailAddress = emailAddress;
		this.context = context;
	}

	@Override
	public void execute() {
		Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("mailto:" + emailAddress));
		context.startActivity(intent);
	}

}
